package com.lagou.client;

import java.io.IOException;

public class ManagerView {

    private StudentView sv;

    private ExamView ev;

    public ManagerView(StudentView sv,ExamView ev){
        this.sv = sv;
        this.ev = ev;
    }


    public void managerShow() throws IOException, ClassNotFoundException {
        while (true) {
            System.out.println("-----------------");
            System.out.println("  \t管理员欢迎您");
            System.out.println("-----------------");
            System.out.println("[1] 学员管理  \t");
            System.out.println("[2] 题库管理 \t");
            System.out.println("[0] 退出系统 \t");

            int choose = ClientScanner.getScanner().nextInt();
            switch (choose) {
                case 1:
                    System.out.println("正在进入学员管理");
                    sv.studentView();
                    break;
                case 2:
                    System.out.println("正在进入题库管理");
                    ev.examShow();
                    break;
                case 3:
                    System.out.println("退出系统");
                    return;
                default:
                    System.out.println("输入错误");
            }
        }
    }


}
